<template>
  <div>
    <DialogNew v-model="is_show" @close="close" title="经纬度设置" width="90%">
      <div>
        <GaodeMap
          ref="GaodeMapRef"
          :modelValue="{}"
          @redayLoaction="readyLoactionBack"
        />
      </div>

      <template #footer></template>
    </DialogNew>
  </div>
</template>

<script setup>
  import DialogNew from '@/components/DialogNew/index.vue'
  import GaodeMap from '@/components/Map/gaodeMao.vue'
  import { message } from '~/src/utils/helper'
  const is_show = ref(false)

 
  const open = () => {
    is_show.value = true
  }

  const close = () => {}

  const emits = defineEmits(['fetch-data'])

  const readyLoactionBack = (val) => {
    if (!val.address) return message('地址未选址,请重新选择', 'error')
    is_show.value = false
    emits('fetch-data', val)
  }

  defineExpose({ open })
</script>

<style lang="scss" scoped></style>
